home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / misc / integra1_0a.lha / Integra / doc / test.doc < prev   
Encoding:
Text File  |  1995-02-06  |  2.1 KB  |  85 lines

  1. This file is a documentation of the small 'tests' supplied with
  2. the integraXXX.lib, updated to version 1.0a (06-02-95)
  3.  
  4. ------------------------------------------------------------------------------
  5.  
  6. The Test/ directory contains some examples that demonstrate the utilization
  7. of the functions supplied in the integration library.
  8. Here follows a short description.
  9.  
  10.  
  11.     0TEST.C
  12.  
  13. Uses: Int_function(), Int_string()
  14.  
  15. 0test 2 3
  16.     Tests Int_function() on function e^(-x^2) (defined inside the
  17.     programma), integration range between 2 and 3
  18.  
  19. 0test 2 3 10
  20.     Same as above, requiring only 10 precision digits (default=15)
  21.  
  22. 0test x^2 2 3 12
  23.     Tests Int_string() on string "x^2", integrating between 2 and 3 with
  24.     12 precision digits. BEWARE: some shells (as CShell) expand asterisks
  25.     so you will have to make correct use of " ". For example
  26.  
  27.         0test "x*x" 2 3 12
  28.  
  29.  
  30.  
  31.     1TEST.C
  32.  
  33. Uses: Int_eq_points()
  34.  
  35. It need a single argument, the number 'n' of points (if not specified you
  36. will be asked), then generates 'n' equidistribuited points between 2 and 5
  37. using the following functions:
  38.  
  39.     x
  40.     x^4-x^3
  41.     x*sin(x)^2
  42.  
  43. It calculates the integral with Int_eq_points() and then shows the result
  44. together with correct evaulation.
  45.  
  46.  
  47.  
  48.     2TEST.C
  49.  
  50. Uses: Int_points()
  51.  
  52. Same as above, but it uses Int_points(). For the first and the third
  53. function, the points are enquidistribuited (Int_points() is not aware of
  54. this). For the second, the points are random generated in the range [2,5].
  55.  
  56.  
  57. BEWARE:
  58. The use of Int_points() and Int_eq_points() is restricted to functions not
  59. explicitely known. These programs are supplied only as an example.
  60. If the function is known, YOU SHOULD use Int_string() and Int_function().
  61.  
  62.  
  63.  
  64.     3TEST.C
  65.     4TEST.C
  66.  
  67. Same as above, but using Int_points_p() and Int_eq_point_p().
  68.  
  69.  
  70.  
  71.  
  72.     PARSE.C
  73.  
  74. This simple program uses the parser function to evaluate its arguments,
  75. if run without command line input, it will prompt for it.
  76. (this is useful to prevent shells from expanding wildcards)
  77.  
  78. Example:
  79.     parse "2^3*2"            result        16
  80.     parse sin(p/4)                    0.7071067...
  81.  
  82.  
  83.  
  84. ------------------------------------------------------------------------------
  85.